﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>定义图形，比如图表和其他图像。</title>
    <script type="text/javascript">
        window.onload = function() {
            drawCanvas();
        }
        function drawCanvas() {
            var canvas = document.getElementById('myCanvas');
            var ctx = canvas.getContext('2d');
            ctx.fillStyle = '#FF1111';
            ctx.fillRect(0, 0, 80, 100);
        }
    </script>

</head>
<body>
    <canvas id="myCanvas" style="width: 100px; height: 500px;">
        your browser does not support the canvas tag
    </canvas>

</body>
</html>